package com.iqiyi.mapper;

import com.iqiyi.po.Video;
import com.iqiyi.po.VideoExample;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface VideoMapper {
    int countByExample(VideoExample example);

    int deleteByExample(VideoExample example);

    int deleteByPrimaryKey(Integer vid);

    int insert(Video record);

    int insertSelective(Video record);

    List<Video> selectByExample(VideoExample example);

    Video selectByPrimaryKey(Integer vid);

    int updateByExampleSelective(@Param("record") Video record, @Param("example") VideoExample example);

    int updateByExample(@Param("record") Video record, @Param("example") VideoExample example);

    int updateByPrimaryKeySelective(Video record);

    int updateByPrimaryKey(Video record);

    List<Video> selectVideoBySort(Integer sid);

    //查询视频所有信息及关联（多表）
    List<Video> selectVideos();

    //通过vid查询某条信息（多表）
    Video selectVideoByVid(Integer vid);

    //通过sname进行模糊查询
    List<Video> selectSnameByLike(String sname);
    /**
     * 通过视频id和剧集id查询视频=url
     */
    String findVideoByVidAndEnumber(@Param("vid") int vid, @Param("enumber") int enumber);

    Video findVideoByVid(@Param("vid")int vid);

    List<String> findVideoUrlByVid(@Param("vid") int vid);
}